package com.zlx.ssm.controller;

import com.zlx.ssm.service.IUserService;
import com.zlx.ssm.vo.MenuVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {

    @Autowired
    private IUserService iUserService;

    @RequestMapping("/user/login")
    public String login() {

        return "login";
    }



    @RequestMapping("/user/main")
    public String main() {

        return "index";
    }


    @RequestMapping("/user/bean")
    @ResponseBody
    public MenuVO login2() {

        MenuVO jsonObj = iUserService.getJsonObj();

        return jsonObj;
    }


    @RequestMapping("/user/welcome")
    public String tz() {

        return "welcome";
    }

}
